﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NodeItem.aspx.cs" Inherits="Manage_Cms_NodeItem" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" type="text/css" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" />
    <script type="text/javascript">
        var $$=function(id){return document.getElementById(id);}
        function changeDis(hidID,showID)
        {
            $$(hidID).style.display="none";
            $$(showID).style.display="block";
        }
    </script>
</head>
<body>
    <%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
    <div class="mycolumn">
        <div class="columntitle"><%=ActName %>栏目</div>
        <form id="myForm" name="myForm" method="post" action="?act=<%=ActFlag %>&siteid=<%=siteid%>"  onsubmit="return validator(this)" >
            <table cellpadding="4" width="98%" align="center">
            <tr>
                <td align="left" width="120">
                    <img src="../pic/icons/help.gif" alt="栏目的父栏目的名称" onclick="helpInf(this)" /> 父栏目：
                </td>
                <td align="left" class="tdselect">
                    <select name="ParentID" id="ParentID"  >
                         <%=SelectNodeList(0, modelCmsNode.ParentID,modelCmsNode.NodeID)%>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <img src="../pic/icons/help.gif" alt="栏目名称" onclick="helpInf(this)" /> <strong style="color:red">*</strong>栏目名称：
                </td>
                <td align="left">
                    <input type="text" name="NodeName"  valid="required" value="<%=modelCmsNode.NodeName %>" errmsg="请输入栏目名称。"/>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <img src="../pic/icons/help.gif" alt="栏目索引名称" onclick="helpInf(this)" /> <strong style="color:red">*</strong>栏目索引名称：
                </td>
                <td align="left">
                    <% if (modelCmsNode.NodeKey=="" || modelCmsNode.NodeKey==null) {%>
                    <input type="text" name="NodeKey" id="NodeKey" value="<%=modelCmsNode.NodeKey %>" valid="required" errmsg="请输入栏目索引名称。" />
                    <%}else {%>
                    <%=modelCmsNode.NodeKey %>
                    <%} %>  
                </td>
            </tr>
            <tr>
                <td align="left">
                    <img src="../pic/icons/help.gif" alt="节点内容模型" onclick="helpInf(this)" /> 节点内容模型：
                </td>
                <td align="left" class="tdradio">
                    <input type="radio" name="NodeType" value="1" <%=modelCmsNode.NodeType==1||modelCmsNode.NodeType==0?"checked":"" %> onclick="changeDis('tr2','tr1')"/>列表节点　
                    <input type="radio" name="NodeType" value="2" <%=modelCmsNode.NodeType==2?"checked":"" %> onclick="changeDis('tr2','tr1')"/>单页节点　
                    <input type="radio" name="NodeType" value="3" <%=modelCmsNode.NodeType==3?"checked":"" %> onclick="changeDis('tr1','tr2')"/>外部链接
                    <input type="radio" name="NodeType" value="4" <%=modelCmsNode.NodeType==4?"checked":"" %> onclick="changeDis('tr2','tr1')"/>在线问答　
                </td>
            </tr>            
            <tr id="tr1" style="display:<%=modelCmsNode.NodeType==3?"none":""  %>">
                <td colspan="2" style="padding:0;margin:0">
                    <table width="100%" cellpadding="2" >
                        <tr>
                            <td align="left" >
                                <img src="../pic/icons/help.gif" alt="内容模型" onclick="helpInf(this)" /> 内容模型：
                            </td>
                            <td align="left" class="tdselect">
                                <select name="ModelID" >
                                    <%=KeRui.BLL.Common.GetSelectListForTemplate(modelCmsNode.ModelID.ToString(), dsCmsModel)%>
                                </select>
                            </td>
                        </tr>
                        <tr >
                            <td align="left"  height="30">
                                <img src="../pic/icons/help.gif" alt="栏目页模板文件" onclick="helpInf(this)" /> 栏目页模板文件：
                            </td>
                            <td align="left" class="tdselect">
                                <select name="TemplateFile" >
                                    <%=KeRui.BLL.Common.GetSelectListForTemplate(modelCmsNode.TemplateFile == null ? "" : modelCmsNode.TemplateFile, dsNoteTemp)%>
                                </select>
                            </td>
                        </tr>                    
                        <tr >
                            <td align="left"  width="126" height="26">
                                <img src="../pic/icons/help.gif" alt="内容页模板文件" onclick="helpInf(this)" /> 内容页模板文件：
                            </td>
                            <td align="left" class="tdselect">
                                <select name="ContentDefaultTemplateFile" >
                                    <%=KeRui.BLL.Common.GetSelectListForTemplate(modelCmsNode.ContentDefaultTemplateFile == null ? "" : modelCmsNode.ContentDefaultTemplateFile, dsContentTemp)%>
                                </select>
                            </td>
                        </tr>
                        <tr >
                            <td align="left"  width="126" height="26">
                                <img src="../pic/icons/help.gif" alt="评论页模板文件" onclick="helpInf(this)" /> 评论页模板文件：
                            </td>
                            <td align="left" class="tdselect">
                                <select name="CommentTemplate" >
                                    <%=KeRui.BLL.Common.GetSelectListForTemplate(modelCmsNode.CommentTemplate == null ? "" : modelCmsNode.ContentDefaultTemplateFile, dsCommentTemp)%>
                                </select>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr id="tr2" style="display:<%=modelCmsNode.NodeType==3?"":"none"  %>">
                <td align="left"  >
                    <img src="../pic/icons/help.gif" alt="外部链接地址" onclick="helpInf(this)" /> 外部链接地址：
                </td>
                <td align="left" >
                    <input type="text" name="NodeLinkUrl" value="<%=modelCmsNode.NodeLinkUrl %>" valid="required" errmsg="外部链接地址。"/> http://
                </td>
            </tr>            
            
            <tr>
                <td align="left" >
                    <img src="../pic/icons/help.gif" alt="是否在菜单处显示" onclick="helpInf(this)" /> 栏目图片：
                </td>
                <td align="left" >
                    <input  type="file" name="NodePicUrl"  value="<%=modelCmsNode.NodePicUrl %>"/>
                </td>
            </tr>              
            
            <tr>
                <td align="left" >
                    <img src="../pic/icons/help.gif" alt="针对搜索引擎的关键字" onclick="helpInf(this)" /> 关键字：
                </td>
                <td align="left" >
                    <input type="text" name="MetaKeywords"  value="<%=modelCmsNode.MetaKeywords %>"/> 
                </td>
            </tr>              
            
            <tr>
                <td align="left" >
                    <img src="../pic/icons/help.gif" alt="针对搜索引擎的描述" onclick="helpInf(this)" /> 描述：
                </td>
                <td align="left" >
                    <input type="text" name="MetaDescription" value="<%=modelCmsNode.MetaDescription %>"/>
                </td>
            </tr>   
            <tr>
                <td align="left" >
                    <img src="../pic/icons/help.gif" alt="是否在菜单处显示" onclick="helpInf(this)" /> 是否用于导航：
                </td>
                <td align="left" class="tdcheckbox">
                    <input  type="checkbox" name="ShowOnMenu" value="1" <%=modelCmsNode.ShowOnMenu==true?"checked":"" %>/>是
                </td>
            </tr>   
            <tr>
                <td align="left" >
                    <img src="../pic/icons/help.gif" alt="控制列表页显示的条数" onclick="helpInf(this)" /> 列表页分页条数：
                </td>
                <td align="left" >
                    <input type="text" name="ContentPageSize" value="<%=modelCmsNode.ContentPageSize==0?45:modelCmsNode.ContentPageSize %>"/> 
                </td> 
            </tr>            
            
            <tr>
                <td colspan="2" align="center" class="tdbutton">
                    <input type="submit" name="Ok" value="确 定" class="button" />&nbsp;&nbsp;
                    <input type="button" name="Cancel" value="取 消" onclick="window.parent.ymPrompt.doHandler('close');" class="button" />
                    <input type="hidden" name="siteID" value="<%=siteid %>" />
                    <input type="hidden" name="NodeID" value="<%=modelCmsNode.NodeID %>" />
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
